$("#category-490 :checkbox").change(function() { 
    if($(this).attr("checked")){
        $(this).parents("li").each(function(){        
            $(this).children(".selectit").find(":checkbox").attr("checked","checked");
        })
    }else{
        $(this).parents("li").each(function(){        
            $(this).children(".selectit").find(":checkbox").attr("checked","");
        })
    }
    $("#in-category-490").attr("checked","checked");   
    });

